package simulator.software.scheduling;

import java.util.List;

import simulator.software.Process;

/**
 * <code>Scheduler</code> defines the behaviors expected of a process scheduling
 * algorithm. It is the responsibility of the scheduling algorithm to supply the
 * kernel with a process to run based on the list of ready processes.
 * 
 * @author Kyle Loomis
 * @author Dave LaPointe
 * 
 */
public interface Scheduler
{
   /**
    * Gets a brief description of this scheduling algorithm.
    * 
    * @return a brief description of this scheduling algorithm.
    */
   public String getDescription();

   /**
    * Selects and returns the next process to run from the pool of ready
    * processes. Returns null if no ready processes exist.
    * 
    * @param processTable
    *           the kernel's list of processes.
    * @return the next process to run. Returns null if no ready processes exist.
    */
   public Process nextProcess(List<Process> processTable);
}